package ph.loong.deliveryman.fragment.work

import android.content.Intent
import android.support.v7.widget.LinearLayoutManager
import android.view.View
import com.chad.library.adapter.base.BaseQuickAdapter
import deliveryman.loong.ph.deliveryman.R
import kotlinx.android.synthetic.main.fragment_work_exception.*
import ph.loong.deliveryman.adapter.WorkExceptionAdapter
import ph.loong.deliveryman.base.BaseFragment
import ph.loong.deliveryman.ui.work.WorkBillDetailActivity
import java.util.*

/**
 * Author jc.lu.
 * Dates 2018/2/22.
 * Email Tbsupland@163.com.
 * desc
 */
class WorkExceptionFragment : BaseFragment(), BaseQuickAdapter.OnItemChildClickListener {



    override fun getLayoutId(): Int = R.layout.fragment_work_exception

    override fun initView() {
        recycler.layoutManager = LinearLayoutManager(context)
        val adapter = WorkExceptionAdapter()
        recycler.adapter = adapter
        var list: ArrayList<String> = ArrayList()
        list.add("item1")
        adapter.setNewData(list)

        adapter.setOnItemChildClickListener(this)
    }

    override fun lazyLoad() {

    }

    override fun onItemChildClick(adapter: BaseQuickAdapter<*, *>?, view: View?, position: Int) {
        val intent = Intent(context, WorkBillDetailActivity::class.java)
        startActivity(intent)
    }
}